package com.woniuxy.config;

import com.woniuxy.entity.po.dic.MinioProp;
import io.minio.MinioClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @BelongsProject: charging-management-platform
 * @BelongsPackage: com.woniuxy.config
 * @Author: Quan
 * @Date: 2025/3/28 11:06
 */
@Configuration
public class MinioConfig {
	@Autowired
	private MinioProp minioProp;
	@Bean
	public MinioClient minioClient() throws Exception {
		return MinioClient.builder().endpoint(minioProp.getEndpoint())
				.credentials(minioProp.getAccesskey(), minioProp.getSecretKey()).build();
	}
}